﻿/*
    机构电子签章表
 */
using Abp.Domain.Entities.Auditing;
using SOEI.Solution.FileUpLoader;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;

namespace SOEI.Solution.Integratedes.ElectronicSignet
{
    /// <summary>
    /// 机构电子签章表
    /// </summary>
    [Table("NESF_ORGSIGNETS")]
    public class OrgSignet: AuditedEntity<long>
    {
        // 机构编号，人员编号，人员账号，机构账号，电子印章，身份证附件，执照附件，

        /// <summary>
        /// 机构编号（与机构表为1对1的关系代码控制）
        /// </summary>
        [Column("JGBH")]
        public string JGBH { get; set; }

        /// <summary>
        /// 人员编号 （指的是机构的管理员的编号）
        /// </summary>
        [Column("RYBH")]
        public string RYBH { get; set; }

        /// <summary>
        /// EQB 个人账户编号（若为空则没有注册个人账号）
        /// </summary>
        [Column("ACCOUNTID")]
        public string AccountID { get; set; }

        /// <summary>
        /// EQB 企业账号编号 （若为空则为没有注册企业账号）
        /// </summary>
        [Column("ORGID")]
        public string ORGID { get; set; }

        /// <summary>
        /// 身份证模块编号
        /// </summary>
        [Column("IDENTIFYMODULEID")]
        public Guid IdentifyModuleID { get; set; }
        /// <summary>
        /// 营业执照附件编号
        /// </summary>
        [Column("LICENSEMODULEID")]
        public Guid LicenseModuleID { get; set; }

        /// <summary>
        /// 上传的印章图片附件
        /// </summary>
        [Column("SIGNETMODULEID")]
        public Guid SignetModuleID { get; set; }

        /// <summary>
        /// 审核状态
        /// </summary>
        [Column("STATUS")]
        public string Status { get; set; }


        #region -------------------------------------------------非映射字段---------------------------------------------- 

        /// <summary>
        /// 是否存在身份证附件
        /// </summary>
        [NotMapped]
        public bool IsExistIdentify { get; set; }

        /// <summary>
        /// 是否存在营业执照
        /// </summary>
        [NotMapped]
        public bool IsExistLicense { get; set; }

        /// <summary>
        /// 身份证附件清单
        /// </summary>
        [NotMapped]
        public ICollection<Attach> IdentifyAttachs { get; set; }

        /// <summary>
        /// 营业执照附件清单
        /// </summary>
        [NotMapped]
        public ICollection<Attach> LicenseAttachs { get; set; }

        /// <summary>
        /// 电子印章附件
        /// </summary>
        [NotMapped]
        public ICollection<Attach> SignetAttachs { get; set; }

        #endregion

    }
}
